package com.hhit.zhgd.domain.dto

import javax.validation.constraints.Min
import javax.validation.constraints.NotBlank
import javax.validation.constraints.NotNull

data class MenuDTO(
    @NotNull(message = "参数错误", groups = [Update::class])
    @Min(value = 1, message = "参数错误", groups = [Update::class])
    val id:Long?,
    @NotBlank(message = "请输入菜单名称", groups = [Save::class,Update::class])
    val name:String?,
    @NotBlank(message = "请选择菜单父级", groups = [Save::class,Update::class])
    @Min(value = 0, message = "参数错误", groups = [Save::class,Update::class])
    val parent_id:Int?,
    @NotBlank(message = "请选择菜单类型", groups = [Save::class,Update::class])
    val type:String?,
    val path:String?,
    val perms:String?,
    val icon:String?,
    val sort:Int?,
    val status:Int?
) {
    interface Save
    interface Update
}
